LEADTOOLS Medical (Leadtools.MedicalViewer assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.31
Reposition Method
See Also 
Leadtools.MedicalViewer Namespace > MedicalViewerCellCollection<MedicalViewerBaseCell> Class : Reposition Method



cellIndex
Index of the cell to be repositioned.
targetCellIndex
The zero-based index that represents the target position for the cell.
swap
true to swap the cells with the indexes cellIndex, targetCellIndex; false to insert the cell with index of cellIndex into targetCellIndex.

The Reposition Method is available as an add-on to the LEADTOOLS Medical Imaging toolkits.

cellIndex
Index of the cell to be repositioned.
targetCellIndex
The zero-based index that represents the target position for the cell.
swap
true to swap the cells with the indexes cellIndex, targetCellIndex; false to insert the cell with index of cellIndex into targetCellIndex.
Repositions the cell by removing it and inserting it into another position in the MedicalViewer control.

Syntax

Visual Basic (Declaration) 
Public Sub Reposition( _
   ByVal cellIndex As Integer, _
   ByVal targetCellIndex As Integer, _
   ByVal swap As Boolean _
) 
Visual Basic (Usage)Copy Code
Dim instance As MedicalViewerCellCollection(Of MedicalViewerBaseCell)
Dim cellIndex As Integer
Dim targetCellIndex As Integer
Dim swap As Boolean
 
instance.Reposition(cellIndex, targetCellIndex, swap)
C# 
public void Reposition( 
   int cellIndex,
   int targetCellIndex,
   bool swap
)
C++/CLI 
public:
void Reposition( 
   int cellIndex,
   int targetCellIndex,
   bool swap
) 

Parameters

cellIndex
Index of the cell to be repositioned.
targetCellIndex
The zero-based index that represents the target position for the cell.
swap
true to swap the cells with the indexes cellIndex, targetCellIndex; false to insert the cell with index of cellIndex into targetCellIndex.

Example

This example swaps the first and the second cell.

Visual BasicCopy Code
Public Sub MedicalViewerCellCollectionRepositionCellsExample()
   Dim myForm As MedicalViewerForm = GetMedicalControl()
   Dim medicalViewer As MedicalViewer = myForm.Viewer
   medicalViewer.Cells.Reposition(0, 1, True)

   myForm.ShowDialog()
End Sub
C#Copy Code
public void MedicalViewerCellCollectionRepositionCellsExample()
{
   MedicalViewerForm myForm = GetMedicalControl();
   MedicalViewer medicalViewer = myForm.Viewer;
   medicalViewer.Cells.Reposition(0, 1, true);

   myForm.ShowDialog();
}

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

Leadtools.MedicalViewer requires a Medical Imaging license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features